<template>
  <div>
    {{sum}}
    <hr>
    {{msg}}
    <hr>
    <hr>
    <input type="text" v-model="person.fullName">
  </div>
</template>

<script>
  import {ref,reactive,watch,watchEffect,onUnmounted,onMounted} from 'vue'
  export default {
    // 等同于vue2的destroied
    unmounted(){

    },
    // 等同于vue2的beforeDestroy
    beforeUnmount() {
      
    },
    setup(){
      // 回调函数会先于外面的unmounted执行
      onUnmounted(() => {
        
      })
      onMounted(() => {
        
      })
      return {
        person,
      }
    },
  }
</script>
